
import Controller.BookController;
import View.*;
import java.util.logging.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author admin-pc
 */
public class AddBookMenuCommand implements Command {

    BookController bookController;

    private static Logger log = Logger.getLogger(AddBookMenuCommand.class.getName());

    public AddBookMenuCommand(BookController bookController) {
        this.bookController = bookController;
    }

    @Override
    public void execute() {

        System.out.println("Введите название:");
        String bookTittle = View.readPressSymbolStr();

        System.out.println("Введите статус:");
        String bookStatus = View.readPressSymbolStr();

        try {
            bookController.bookAdd(bookTittle, bookStatus);
        }
        catch (Exception e) {
            log.log(Level.SEVERE, "Exception: ", e);
        }
    }

}
